#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTreeWidget>
#include <QPixmap>
#include <QLabel>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_actWindowVisiable_toggled(bool arg1);

    void on_actWindowFloating_toggled(bool arg1);

//    void on_dockWidget_topLevelChanged(bool topLevel);

//    void on_dockWidget_visibilityChanged(bool visible);

    void on_actAddFolder_triggered();

    void on_actAddFiles_triggered();

    void on_treeWidget_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);

    void on_actFitWidth_triggered();

    void on_actFitHeight_triggered();

    void on_actScanItem_triggered();

    void on_actDeleteItem_triggered();

    void on_actZooOut_triggered();

    void on_actZoomIn_triggered();

    void on_actRealSize_triggered();

private:
    void scaleImage(float pixRatio);

private:
    Ui::MainWindow *ui;

    QPixmap curPixmap;
    QLabel  labFileName;
    float pixRatio; //图片比例

private:
    enum TreeItemType{itTopItem = 1001, itGroupItem, itImageItem};
    enum TreeColumnNum{colItem = 0, colItemType = 1};
};
#endif // MAINWINDOW_H
